<template>
  <el-container id="app">
  <el-header  id="headers" height="56" >
    <header1></header1>
  </el-header>
      <router-view/>
</el-container>
</template>

<script>
import header1 from "@/components/header1.vue";
import { mapActions } from "vuex";

export default {
  name: "app",
  async beforeMount() {
    let x;
    try {
      x = await this.session();
      if (!x) {
        this.$router.path("/login");
      }
    } catch (e) {
      console.log(e);
    }
  },
  methods: {
    ...mapActions(["session"])
  },
  components: {
    header1
  }
};
</script>


<style>
* {
  margin: 0;
  padding: 0;
}
a:hover {
  text-decoration:none;
}

#headers {
  padding-left: 0;
  padding-right: 0;
}
html,
body,
#app {
  height: 100%;
}
.tk-main {
  -moz-box-shadow: 5px 5px 5px #eee inset; /* For Firefox3.6+ */
  -webkit-box-shadow: 5px 5px 5px #eee inset; /* For Chrome5+, Safari5+ */
  box-shadow: 5px 5px 5px #eee inset; /* For Latest Opera */
}
@font-face {
  font-family: "iconfont"; /* project id 785409 */
  src: url("//at.alicdn.com/t/font_785409_pfdyv82swo.eot");
  src: url("//at.alicdn.com/t/font_785409_pfdyv82swo.eot?#iefix")
      format("embedded-opentype"),
    url("//at.alicdn.com/t/font_785409_pfdyv82swo.woff") format("woff"),
    url("//at.alicdn.com/t/font_785409_pfdyv82swo.ttf") format("truetype"),
    url("//at.alicdn.com/t/font_785409_pfdyv82swo.svg#iconfont") format("svg");
}

.el-tabs__nav-wrap {
  width: 345px;
  margin: 0 auto;
}
.el-tabs__header {
  box-shadow: 0 8px 16px 0 rgba(28, 31, 33, 0.1);
}
.mga {
  margin-bottom: 25px;
}

</style>
